package net.xuzhen97.distributed.transaction.order.common.configure;

import lombok.Data;
import net.xuzhen97.distributed.transaction.order.common.Constant;

/**
 * 错误返回
 * 10001 代表统一异常，就是前端没法做判断，直接进行展示errorMsg吧
 * 10002 未登录异常
 * 其它错误码请根据前台响应做出合适的选择。
 * @author xuzhen
 */
@Data
public class ErrorResult {

    private String code;
    private String msg;

    public ErrorResult(String msg){
        this.code = Constant.ERROR_DEFAULT;
        this.msg = msg;
    }

    public ErrorResult(String code, String msg){
        this.code = code;
        this.msg = msg;
    }
}
